<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<title>彩练帮你办</title>
<link href="css/style.css" rel="stylesheet" />
<link href="css/base.css" rel="stylesheet" />
<script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
<!--[if lt IE 9]>
	<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!--[if lt IE 9]>
	<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
<![endif]-->
<script type="text/javascript">
   (function (doc, win) {
      var docEl = doc.documentElement,
        resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
        recalc = function () {
          var clientWidth = docEl.clientWidth;
          if (!clientWidth) return;
          docEl.style.fontSize = 10 * (clientWidth / 375) + 'px';
        };

      if (!doc.addEventListener) return;
      win.addEventListener(resizeEvt, recalc, false);
      doc.addEventListener('DOMContentLoaded', recalc, false);
    })(document, window);
</script>

</head>
<body>
<div class="wrap">
	<div class="top2">
		<a href=""><img src="img/banner2.jpg" class="banner2"></a>
		<a href=""><img src="img/btn_back2.png" class="btn_back2"></a>
	</div>
	<div class="conbox">
		<div class="title"></div>
		<div class="txt">李**旭&nbsp;&nbsp;2023年11月13日</div>
		<div class="con" id="qtxt"></div>
		<div id="imglist" style="display: flex;"></div>
	</div>
	<div style="background: #efefef;width:100%;height:0.5rem;"></div>
	<div class="conbox2">
		<div id="morelist">

		
		</div>
		<div>


		<div class="con3">*特别声明：“彩练帮你办”平台所刊载内容的知识产权，为彩练新闻所有。未经许可，禁止转载、摘编、复制及建立镜像等任何方式使用。</div>
	</div>
</div>
</body>
<script>
	var typelist=['','求助','咨询','建言','投诉','感谢']
	var url='https://www.cailianxinwen.com'
	$.ajax({
        type: "post",
        url: url+'/app/blog/getBlogCommentReplyList?blogid='+getUrlParam('id'),
         dataType: "json",
         //jsonp: "jsoncallback",
         success: function (json) {
           console.log(json)
			$('.title').html('<span class="hot">'+typelist[json.type]+'</span>&nbsp;|&nbsp;'+json.title)
			$('.txt').html(json.realname+'&nbsp;&nbsp;'+json.posttime)
			$('#qtxt').html(json.content)
			var arr=json.titleimg.split('|')
			arr = $.grep(arr, function (n) {
				return n != "";
			  });
			$.each(arr, function(index, value) {
				$('#imglist').append('<img src="'+value+'" style="width: 7.625rem;height: 7.625rem;margin:4px">')
			})
			if(json.qa.length==1)
			{
				$('.inputbox').show()
			}
			_html=''
			$.each(json.qa,function(index,value){

				if(index%2==0)
				{
					_html+='<div class="txt01">回复：</h3></div>'
					_html+='<div class="con">'+value.comment_details+'</div>'
					_html+='<div class="con2">回复人：'+value.user_name+'</div>'
					Replyid=value.id
				}
				else{
					_html+='<div class="txt01" style="color: red;font-size:14px">继续提问：</h3></div>'
					_html+='<div class="con">'+value.comment_details+'</div>'	
				}
			})
			$('#morelist').html(_html)

         },
         error: function (err) {
             console.log(err)
         }
     });
	 function getUrlParam(name)
	{
	//构造一个含有目标参数的正则表达式对象
	var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
	//匹配目标参数
	var r = window.location.search.substr(1).match(reg);
	//返回参数值
	if (r!=null) return unescape(r[2]); return null;
	}

</script>
<script src="js/init.js"></script>
</html>